package com.king.minepda

import android.widget.EditText
import android.widget.TextView
import com.shunhao.base.BaseActivity
import com.shunhao.model.EventCenter

class TestEnterPageActivity : BaseActivity() {

    private lateinit var mBtnGoLogin: TextView
    private lateinit var mBtnDemo: TextView
    private lateinit var mBtnDebug: TextView
    private lateinit var mEtUrlInput: EditText

    override fun isBindEventBusHere(): Boolean {
        return false
    }

    override fun getContentViewLayoutId(): Int {
        return R.layout.activity_test_input
    }

    override fun initViews() {
        mBtnGoLogin = this.findViewById(R.id.btn_login)
        mBtnDebug = this.findViewById(R.id.btn_debug_apk)
        mBtnDemo = this.findViewById(R.id.btn_demo_apk)
        mEtUrlInput = this.findViewById(R.id.et_url)

        mBtnGoLogin.setOnClickListener {
            WebShellActivity.startWebActivity(mContext, mEtUrlInput.text.toString())
        }

        mBtnDebug.setOnClickListener {
            WebShellActivity.startWebActivity(mContext, "file:///android_asset/local_photo.html")
        }

        //  内网
        mBtnDemo.setOnClickListener {
            val innerIpAddress = "http://192.168.2.200"
            mEtUrlInput.setText("")
            mEtUrlInput.setText(innerIpAddress)
            //WebShellActivity.startWebActivity(mContext, mBtnDemo.text.toString())
        }
    }

    override fun initData() {
    }

    override fun onEventComing(eventCenter: EventCenter<Any>) {
    }
}